<template>
  <div v-title='"商品详情"'>
    <img v-for="(item,index) in imgUrl" :src="item" :alt="index" v-if='index==1' style="width:100%">
  </div>
</template>
<script>
import { getUrlParam } from '@/util/merge'
export default {
  data() {
    return {
      imgUrl: []
    }
  },
  mounted() {
    this.$nextTick(() => {
      document.getElementsByName('viewport')[0].content = 'width=device-width, initial-scale=1.0,user-scalable=yes'
      this.imgUrl = getUrlParam('imgUrl').split(',')
      // console.log(this.imgUrl)
      document.getElementsByTagName('body')[0].style.backgroundColor = '#fff'
    })
  },
  destroyed() {
    document.getElementsByName('viewport')[0].content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'
    document.getElementsByTagName('body')[0].style.backgroundColor = '#f5f5f5'
  }
}
</script>

